Skip to content

Support AS6 install paths#16

Merged
sclaiborne merged 2 commits into
mainfrom
feature/as6
May 1, 2026
Merged

Support AS6 install paths#16
sclaiborne merged 2 commits into
mainfrom
feature/as6

Conversation

@sclaiborne
Copy link
Copy Markdown
Member

AS6 installs to 'C:\Program Files (x86)\BRAutomation' instead of the legacy 'C:\BrAutomation'. getASPath() now probes a list of candidate base directories and prefers the one containing the requested AS version folder, falling back to the legacy default. Preserves behavior for AS<=4.x.

What:

Describe what the changes are.

Why:

Describe the improvement(s) that these changes bring. If applicable, describe the reasoning behind key implementation details.

AS6 installs to 'C:\Program Files (x86)\BRAutomation' instead of the legacy 'C:\BrAutomation'. getASPath() now probes a list of candidate base directories and prefers the one containing the requested AS version folder, falling back to the legacy default. Preserves behavior for AS<=4.x.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Automation Studio path resolution to support AS6’s newer default install directory while maintaining compatibility with legacy AS installs.

Changes:

  • Add a candidate list of known Automation Studio base install directories (legacy + AS6 default locations).
  • Introduce _findASBase() to select the best base directory for a requested AS version (prefer bases containing that version).
  • Update getASPath() to use the new base discovery logic instead of a single hardcoded path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AS <= 4.x installs to versioned folders like AS41/AS45/AS46 (major+minor).
AS 6.x installs into a single AS6 folder where minor revisions (6.0, 6.1,
6.5, ...) share one install path. _parseASVersion now emits AS<major>
when major >= 6 so getASBuildPath/getASPath resolve correctly for AS6
projects (e.g. an apj declaring Version="6.5.1.7" now maps to AS6
instead of the non-existent AS65).
@sclaiborne sclaiborne marked this pull request as ready for review May 1, 2026 15:58
@sclaiborne sclaiborne merged commit 3989d06 into main May 1, 2026
@sclaiborne sclaiborne deleted the feature/as6 branch May 1, 2026 20:43
sclaiborne added a commit that referenced this pull request May 1, 2026
Resolves the conflict introduced by the AS6 fix on main (#16). The fix to ASTools.getASPath / Project._parseASVersion has been ported into the new package locations:

- aspython/paths.py: added _AS_BASE_CANDIDATES + _findASBase() so AS6 (which installs under 'C:\Program Files (x86)\BRAutomation') is discovered alongside the legacy 'C:\BrAutomation'.
- aspython/project.py: Project._parseASVersion now returns 'AS6' for AS 6.x (major-only folder) and keeps 'AS<major><minor>' for AS <= 4.x.
- tests/test_paths.py: covers _findASBase preference + legacy fallback.
- tests/test_project.py: covers AS4/AS6 version parsing.

The top-level ASTools.py shim is kept unchanged (kept ours).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants